<?php
	$result_user = $this->data["result_user"];
	$result_feed = $this->data["result_feed"];
	$result_feed_count = $this->data["result_feed_count"];
	$result_feed_date_count = $this->data["result_feed_date_count"];
	$result_feed_date = $this->data["result_feed_date"];
?>
<section class="vbox">
	<section class="scrollable">
		<section class="hbox stretch">
			<aside class="col-lg-4 b-l no-padder">
				<section class="vbox">
					<header class="header bg-white b-b b-light"> <p><i class="fa fa-columns"></i> Thông Tin User</p> </header>
					<section class="scrollable wrapper">
						<div class="wrapper">
							<div class="row">
								<div class="col-lg-12">
									<div class="row">
										<div class="col-sm-6">
											<section class="panel panel-default">
												<header class="panel-heading bg-light no-border">
													<div class="clearfix">
														<a href="#" class="pull-left thumb-md avatar b-3x m-r"> <img src="<?php echo base_url()?>images/un-avatar.png"> </a> 
														<div class="clear">
															<div class="h3 m-t-xs m-b-xs"> <?php echo $result_user["uFullname"]?> <i class="fa fa-circle text-success pull-right text-xs m-t-sm"></i> </div>															
														</div>
													</div>
												</header>
												<div class="list-group no-radius alt"> 
												<a class="list-group-item" href="#"> <span class="badge bg-success"><?php echo $this->data["count_customer"]; ?></span> <i class="fa fa-comment icon-muted"></i> Số khách hàng quản lý </a> 
													<a class="list-group-item" href="#"> <span class="badge bg-info"><?php echo $result_feed_count?></span> <i class="fa fa-envelope icon-muted"></i> Tổng số hoạt động </a> 
													<a class="list-group-item" href="#"> <span class="badge bg-light"><?php echo $result_feed_date_count?></span> <i class="fa fa-eye icon-muted"></i> Tổng hoạt động trong 30 ngày gần đây </a> 
													
												</div>
											</section>
											<section class="panel panel-info">
											<div class="col-sm-12">
												<h3 class="m-b-xs text-black">Chi tiết hoạt động trong 24h</h3>
											</div>
											<?php
												foreach($result_feed_date as $value){
											?>
												<div class="panel-body">
													<a href="#" class="thumb pull-right m-l m-t-xs avatar"> <img src="<?php echo base_url()?>images/un-avatar.png"> <i class="on md b-white bottom"></i> </a> 
													<div class="clear"> <a href="#" class="text-info">@<?php echo $value["cust_first_name"].$value["cust_last_name"] ?> <i class="icon-twitter"></i></a> <small class="block text-muted"><?php echo $value["feed_content"] ?></small> <a href="<?php echo base_url()?>customer/detail?id=<?php echo $value["cust_id"]?>" class="btn btn-xs btn-success m-t-xs">Xem chi tiết</a> </div>

												</div>
											<?php
												}
											?>
											</section>
										</div>
										<div class="col-sm-6">
											<section class="panel panel-default">
												<header class="panel-heading">Dòng hoạt động</header>
												<section class="chat-list panel-body">
													<section class="comment-list block">
														<?php 
															foreach($result_feed as $value){
																?>
																<article id="comment-id-3" class="comment-item">
																	<a class="pull-left thumb-sm avatar">
																		<img src="<?php echo base_url()?>images/un-avatar.png">
																	</a> <span class="arrow left"></span>
																	<section class="comment-body panel panel-default">
																		<header class="panel-heading"> <a href="#"><strong><?php echo $result_user["uFullname"] ?></strong></a>

																			gặp khách hàng <a href="<?php echo base_url()?>customer/detail?id=<?php echo $value["cust_id"]?>" title="sdasdas đâsd" class="label bg-warning m-l-xs"><?php echo $value["cust_first_name"]." ".$value["cust_last_name"]; ?></a> <span class="text-muted m-l-sm pull-right"> <i class="fa fa-clock-o"></i> <?php echo @date("d-m-Y h:i:s",$value["feed_action_time"]); ?></span>
																		</header>
																		<div class="panel-body">
																			<div  class="col-xs-12"><?php echo $value["feed_content"]?></div>
																		</div>
																	</section>
																</article>
																<?php
															}
															?>
													</section>
													<section class="chat-list block">
														<article class="chat-item left">
															<div class="col-lg-12 text-center">
																<ul class="pagination pagination">
																	<?php 
																	$config['base_url'] = base_url().'users/detail?id='.$_REQUEST["id"];
																	$config['total_rows'] = $result_feed_count;
																	$config['per_page'] = 10; 
																	$config['page_query_string'] = TRUE;
																	$config['full_tag_open'] = '<li>';
																	$config['full_tag_close'] = '</li>';
																	$config['last_tag_open'] = '<li>';
																	$config['last_tag_close'] = '</li>';
																	$config['next_tag_open'] = '<li>';
																	$config['next_tag_close'] = '</li>';
																	$config['prev_tag_open'] = '<li>';
																	$config['prev_tag_close'] = '</li>';
																	$config['cur_tag_open'] = '<li><a><b>';
																	$config['cur_tag_close'] = '</b></a></li>';
																	$config['num_tag_open'] = '<li>';
																	$config['num_tag_close'] = '</li>';
																	$this->pagination->initialize($config); 
																	echo $this->pagination->create_links();
																	?>

																</ul>
															</div>



														</article>
													</section>
												</section>											
											</section>
										</div>
									</div>
								</div>
							</div>
						</div>
					</section>
				</section>
			</aside>
		</section>
	</section>
</section>

